package dao;

import java.awt.Color;
import java.rmi.RemoteException;
import java.util.Vector;

import rmi.ClientNotification;

/*
 * Liste les fonctions du serverImpl
 */
public interface Server extends java.rmi.Remote {

	public String create_account(String login, String passwd,
			String email) throws RemoteException;

	public String create_perso(String pseudo, String login, int life, int damage, int armor,
			Color peau, Color habits, Color yeux, Color cheveux, String sexe) throws RemoteException;
	
	/**
	 * Connects the user returning the client
	 * @param id the login of the user
	 * @param passwd the password of the user
	 * @return true if exists and password good, false else
	 * @throws RemoteException
	 */
	public boolean connect_user(String id, String passwd) throws RemoteException;

	public int move_character(String id, String direction)
			throws RemoteException;

	public int fight_character(String n_attacker, String n_defender) throws RemoteException;
	
	public int fight_monster(String n_attacker) throws RemoteException;

	public void speak(String speaker, int range, String message)
			throws RemoteException;
	
	public void createDungeon() throws RemoteException;

	public boolean registerRemoteClient(ClientNotification cni, String login)
			throws RemoteException;

	public boolean loginAlredayExist(String a) throws RemoteException;
	
	public boolean pseudoAlredayExist(String a) throws RemoteException;
	
	public Vector<String> getOtherPeopleInRoom(String login)throws RemoteException;
	
	public int    getCharacterLife(String login)      throws RemoteException;
	public int    getCharacterLife_max(String login)  throws RemoteException;
	public String getCharacterPseudo(String login)    throws RemoteException;
	public int    getCharacterPeau(String login)      throws RemoteException;
	public int    getCharacterHabits(String login)    throws RemoteException;
	public int    getCharacterYeux(String login)      throws RemoteException;
	public int    getCharacterCheveux(String login)   throws RemoteException;
	public int    getCharacterRoom(String login)      throws RemoteException;
	public String getCharacterSex(String login)       throws RemoteException;
	
	public boolean doorRoom(int idroom, String direction) throws RemoteException;

	public int getMonsterLife(Integer idroom) throws RemoteException ;

	public void unregisterRemoteClient(String login) throws RemoteException;

	public String getMonsterName(Integer idroom) throws RemoteException;
	
	public boolean getBusyMonster(Integer idroom, String login) throws RemoteException;

	public void manageMonsters() throws RemoteException;

	public boolean isCharacter(String selectedItem) throws RemoteException;

	public boolean serverEmpty() throws RemoteException;

	public void reloadAllCharacters() throws RemoteException;

}